<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" />
    <button>搜索</button>
    <script>
        const keyword = window.location.search.split("=")[1];
        document.getElementsByTagName('input')[0].value = `""/><script>alert('XSS');</script>`
    </script>
    <!-- <input type="text" value=""><script>alert('XSS');</script>
    <button>搜索</button> -->
</body>

</html>